import * as url from '../constants/api';
import req from '@/utils/request';

// 获取权限
export function getPermissionList(params) {
    return req({
        method: 'GET',
        url: url.PERMISSION,
        params
    });
}
// 更新权限
export function updatePermission(data) {
    return req({
        method: 'POST',
        url: url.PERMISSIONS + data.id,
        data
    })
}

// 删除权限
export function delPermission(id) {
    return req({
        url: url.PERMISSIONS + id,
        method: 'DELETE'
    })
}
// 获取权限详情
export function getPermissionDetail(id) {
    return req({
        method: 'GET',
        url: url.PERMISSIONS + id,
    })
}